package pokerclient.view;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JComponent;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextPane;
import javax.swing.LayoutStyle;

import org.jdesktop.application.Application;

/**
 * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
 * Builder, which is free for non-commercial use. If Jigloo is being used
 * commercially (ie, by a corporation, company or business for any purpose
 * whatever) then you should purchase a license for each developer using Jigloo.
 * Please visit www.cloudgarden.com for details. Use of Jigloo implies
 * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
 * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
 * ANY CORPORATE OR COMMERCIAL PURPOSE.
 */
public class AboutDialog extends javax.swing.JDialog implements ActionListener {
	private static final long serialVersionUID = 2182081205470056194L;
	private JPanel aboutPanel;
	private JLabel createLabel;
	private JTextPane authorPane;
	private JLabel infoHeaderLabel;
	private JLabel headerLabel;
	private JButton okButton;

	/**
	 * Auto-generated main method to display this JDialog
	 */

	public AboutDialog(JFrame frame) {
		super(frame, "About AllInIt", true);
		initGUI();
		okButton.addActionListener(this);
		this.setVisible(true);
	}
	
	public void actionPerformed(ActionEvent evt){
		this.dispose();
	}

	private void initGUI() {
		try {
			{
				aboutPanel = new JPanel();
				GroupLayout aboutPanelLayout = new GroupLayout(
						(JComponent) aboutPanel);
				aboutPanel.setLayout(aboutPanelLayout);
				getContentPane().add(aboutPanel, BorderLayout.CENTER);
				{
					okButton = new JButton();
					okButton.setName("okButton");
				}
				{
					headerLabel = new JLabel();
					headerLabel.setName("headerLabel");
				}
				{
					infoHeaderLabel = new JLabel();
					infoHeaderLabel.setName("infoHeaderLabel");
				}
				{
					authorPane = new JTextPane();
					authorPane.setName("authorPane");
				}
				{
					createLabel = new JLabel();
					createLabel.setName("createLabel");
				}
				aboutPanelLayout
						.setHorizontalGroup(aboutPanelLayout
								.createSequentialGroup()
								.addContainerGap(50, 50)
								.addGroup(
										aboutPanelLayout
												.createParallelGroup()
												.addGroup(
														aboutPanelLayout
																.createSequentialGroup()
																.addComponent(
																		infoHeaderLabel,
																		GroupLayout.PREFERRED_SIZE,
																		291,
																		GroupLayout.PREFERRED_SIZE)
																.addGap(0,
																		0,
																		Short.MAX_VALUE))
												.addGroup(
														GroupLayout.Alignment.LEADING,
														aboutPanelLayout
																.createSequentialGroup()
																.addComponent(
																		authorPane,
																		0,
																		122,
																		Short.MAX_VALUE)
																.addGap(169))
												.addGroup(
														GroupLayout.Alignment.LEADING,
														aboutPanelLayout
																.createSequentialGroup()
																.addComponent(
																		createLabel,
																		GroupLayout.PREFERRED_SIZE,
																		64,
																		GroupLayout.PREFERRED_SIZE)
																.addGap(0,
																		47,
																		Short.MAX_VALUE)
																.addGroup(
																		aboutPanelLayout
																				.createParallelGroup()
																				.addComponent(
																						headerLabel,
																						GroupLayout.Alignment.LEADING,
																						GroupLayout.PREFERRED_SIZE,
																						89,
																						GroupLayout.PREFERRED_SIZE)
																				.addGroup(
																						GroupLayout.Alignment.LEADING,
																						aboutPanelLayout
																								.createSequentialGroup()
																								.addComponent(
																										okButton,
																										GroupLayout.PREFERRED_SIZE,
																										77,
																										GroupLayout.PREFERRED_SIZE)
																								.addGap(12)))
																.addGap(91)))
								.addContainerGap(43, 43));
				aboutPanelLayout
						.setVerticalGroup(aboutPanelLayout
								.createSequentialGroup()
								.addContainerGap(25, 25)
								.addComponent(headerLabel,
										GroupLayout.PREFERRED_SIZE,
										GroupLayout.PREFERRED_SIZE,
										GroupLayout.PREFERRED_SIZE)
								.addPreferredGap(
										LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(infoHeaderLabel,
										GroupLayout.PREFERRED_SIZE, 16,
										GroupLayout.PREFERRED_SIZE)
								.addGap(0, 38, Short.MAX_VALUE)
								.addComponent(createLabel,
										GroupLayout.PREFERRED_SIZE, 16,
										GroupLayout.PREFERRED_SIZE)
								.addPreferredGap(
										LayoutStyle.ComponentPlacement.RELATED,
										0, GroupLayout.PREFERRED_SIZE)
								.addComponent(authorPane,
										GroupLayout.PREFERRED_SIZE, 69,
										GroupLayout.PREFERRED_SIZE)
								.addGap(0, 17, GroupLayout.PREFERRED_SIZE)
								.addComponent(okButton,
										GroupLayout.PREFERRED_SIZE, 26,
										GroupLayout.PREFERRED_SIZE)
								.addContainerGap());
			}
			setSize(400, 300);
			Application.getInstance().getContext().getResourceMap(getClass())
					.injectComponents(getContentPane());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
